import request from '../utils/request'

export const userReg = (info)=>{ //注册
  return request.post('/users',info)
}

export const userLogin = (info)=>{ //登录
  return request.get('/users',{
    params:info
  })
}

export const userUpdate = (userId,obj)=>{ //更新用户信息（换头像）
  return request.put(`/users?_id=${userId}`,obj)
}

export const userJoin = (userId)=>{
  return request.get('/client/join/list',{
    params:{userId}
  })
}